import request from '@/utils/request'

// 查询考勤打卡列列表
export function listStudentPunchs(query) {
  return request({
    url: '/edu/studentPunchs/list',
    method: 'get',
    params: query
  })
}

export function listPunchsByAttendance(studentId, dateRange) {
  return request({
    url: '/edu/studentPunchs/list/' + studentId + "/" + dateRange[0] + "/" + dateRange[1],
    method: 'get'
  })
}

// 查询考勤打卡列详细
export function getStudentPunchs(scheduleInfoId) {
  return request({
    url: '/edu/studentPunchs/' + scheduleInfoId,
    method: 'get'
  })
}

// 新增考勤打卡列
export function addStudentPunchs(data) {
  return request({
    url: '/edu/studentPunchs',
    method: 'post',
    data: data
  })
}

// 修改考勤打卡列
export function updateStudentPunchs(data) {
  return request({
    url: '/edu/studentPunchs',
    method: 'put',
    data: data
  })
}

// 删除考勤打卡列
export function delStudentPunchs(scheduleInfoId) {
  return request({
    url: '/edu/studentPunchs/' + scheduleInfoId,
    method: 'delete'
  })
}

// 导出考勤打卡列
export function exportStudentPunchs(query) {
  return request({
    url: '/edu/studentPunchs/export',
    method: 'get',
    params: query
  })
}